package cn.edu.tju.fctl.service.impl;

import cn.edu.tju.fctl.dao.DepartMapper;
import cn.edu.tju.fctl.entities.Depart;
import cn.edu.tju.fctl.service.IDepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by liutong on 15/12/27.
 */
@Service
public class DepartService implements IDepartService {
    @Autowired
    DepartMapper departMapper;

    @Override
    public Depart findByID(int id) {
        return departMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Depart> findAll() {
        return departMapper.selectAll();
    }
}
